package cn.hy.repository;

import cn.hy.domain.Order;
import cn.hy.mapper.OrderMapper;
import cn.hy.page.PageParameter;
import cn.hy.vo.OrderPageVo;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class OrderRepository {


    @Resource
    private OrderMapper orderMapper;

    public List<Order> page() {
        PageParameter page = PageParameter.builder().currentPage(1).pageSize(10).build();
        OrderPageVo orderPageVo = new OrderPageVo();
        orderPageVo.setPage(page);
        return orderMapper.selectByPage(orderPageVo);
    }
}
